package com.framework.spring.domain;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author duanzhizhou
 * @date 2025/4/9
 */
@Data
@AllArgsConstructor
public class ScheduleTask implements Comparable<ScheduleTask>{
    
    private Runnable task;
    
    private long delay;
    
    private long period;
    
    @Override
    public int compareTo(ScheduleTask o) {
        return Long.compare(delay, o.delay);
    }
}
